package za.org.jcicada.genss.alarm;

import za.org.jcicada.genss.sensor.ISensor;
import za.org.jcicada.genss.sensor.impl.SensorStatusValue;

/**
 * Interface defined for specifying an alarm rule for calculating the current
 * alarm status.
 * 
 * @author rcrida
 * 
 */
public interface IAlarmRule {

    /**
     * Used to calculated the alarm status given a sensor and its value. Any
     * rules can be applied in a derived class.
     * 
     * @param sensor the sensor object
     * @param value the current sensor value
     * @return the calculated alarm status
     */
    AlarmStatus calcStatus(ISensor sensor, SensorStatusValue value);

}
